// commons/diy/topic/index.js
Component({
  /**
   * 组件的属性列表
   */
  properties: {
    topic_setting: {
      type: Object,
      value: {}
    }
  },

  /**
   * 组件的初始数据
   */
  data: {
    topic_list: []
  },
  ready: function () {
    this.setData({
      __wxapp_img: wx.getStorageSync('wxapp_img')
    })
    if (!this.properties.notice) {
      this.getDiyInfo();
    }
  },

  /**
   * 组件的方法列表
   */
  methods: {
    getDiyInfo: function () {
      var that = this;
      var shop = wx.getStorageSync('address_info');
      var shop_id = shop && shop.shop_id ? shop.shop_id : 0
      var item = {
        name: "topic",
        shop_id: shop_id
      };
      getApp().request({
        url: getApp().api.index.get_diy_info,
        data: item,
        success: function(t) {
          console.log('ttttttttt', t)
          that.setData({
            topic_list : t.data.list
          })
        },
        complete: function() {
          
        }
      })
    },
  }
})
